-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Item as kwarg #177
Item as kwarg #177
Conversation
self.objects = [ViewerSceneObject(item, **kwargs) for item in self.collection.items] | ||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
kwargs.pop("item") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was to remove item from kwargs so in next line item
is not given twice which will trigger error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just put item as a keyword argument in the first init
@tomvanmele done, take another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few small things. otherwise LGTM
def __init__(self, graph: Graph, **kwargs): | ||
super(GraphObject, self).__init__(graph=graph, **kwargs) | ||
self.graph: Graph | ||
"""Viewer scene object for displaying COMPAS Graph data.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not add the type of graph
Accommodating the changes from compas-dev/compas#1353